<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>

<body>


    <script>
        var game = {
            attribute: {
                role: "luoke",
                hl: "90",
                score: "100",
                time: "10",
            },
            run: function () {
                console.log("逃跑对象", this.attribute.role);
                console.log("逃跑对象的血量", this.attribute.hl);
                console.log("逃跑对象的分数", this.attribute.score);
                console.log("时间", this.attribute.time);
            },
            kill: function () {
                console.log("杀死对象", this.attribute.role);
                console.log("杀死对象的血量", this.attribute.hl);
                console.log("杀死对象的分数", this.attribute.score);
                console.log("时间", this.attribute.time);
            }
        }

        game.run();
        // game.kill();
    </script>
</body>

</html>